using IcsSEMCtrl.Util;
using System;
namespace IcsSEMCtrl.Global.Device
{
	public class CarrierElevType
	{
		public const int _ELEV0 = 0;
		public const int _WIRE_H = 1;
		public const int _WIRE_N = 2;
		public const int _NORMAL = 3;
		private int _value;
		private static int _size;
		private static CarrierElevType[] _array;
		public static string[] displayStrings;
		public static CarrierElevType[] displayValues;
		public static CarrierElevType ELEV0;
		public static CarrierElevType WIRE_H;
		public static CarrierElevType WIRE_N;
		public static CarrierElevType NORMAL;
		public static CarrierElevType IT_ENUM_MAX;
		static CarrierElevType()
		{
			CarrierElevType._size = 4;
			CarrierElevType._array = new CarrierElevType[CarrierElevType._size];
			CarrierElevType.displayStrings = new string[CarrierElevType._size];
			CarrierElevType.displayValues = new CarrierElevType[CarrierElevType._size];
			CarrierElevType.ELEV0 = new CarrierElevType(0);
			CarrierElevType.WIRE_H = new CarrierElevType(1);
			CarrierElevType.WIRE_N = new CarrierElevType(2);
			CarrierElevType.NORMAL = new CarrierElevType(3);
			CarrierElevType.IT_ENUM_MAX = new CarrierElevType(2147483647);
			CarrierElevType.displayStrings[0] = "ELEV_0";
			CarrierElevType.displayStrings[1] = "WIRE_H";
			CarrierElevType.displayStrings[2] = "WIRE_N";
			CarrierElevType.displayStrings[3] = "NORMAL";
			CarrierElevType.displayValues[0] = CarrierElevType.ELEV0;
			CarrierElevType.displayValues[1] = CarrierElevType.WIRE_H;
			CarrierElevType.displayValues[2] = CarrierElevType.WIRE_N;
			CarrierElevType.displayValues[3] = CarrierElevType.NORMAL;
		}
		public static string ValueToString(CarrierElevType val)
		{
			string result;
			switch (val.Value())
			{
			case 0:
				result = CarrierElevType.displayStrings[0];
				break;
			case 1:
				result = CarrierElevType.displayStrings[1];
				break;
			case 2:
				result = CarrierElevType.displayStrings[2];
				break;
			case 3:
				result = CarrierElevType.displayStrings[3];
				break;
			default:
				result = "";
				break;
			}
			return result;
		}
		public static CarrierElevType StringToValue(string val)
		{
			CarrierElevType result;
			if (Helper.IsNullOrEmpty(val))
			{
				result = CarrierElevType.IT_ENUM_MAX;
			}
			else
			{
				for (int i = 0; i < CarrierElevType.displayStrings.Length; i++)
				{
					if (val.Equals(CarrierElevType.displayStrings[i]))
					{
						result = CarrierElevType.displayValues[i];
						return result;
					}
				}
				result = null;
			}
			return result;
		}
		public int Value()
		{
			return this._value;
		}
		public static CarrierElevType From_Int(int value)
		{
			CarrierElevType result;
			if (value >= 0 && value < CarrierElevType._size)
			{
				result = CarrierElevType._array[value];
			}
			else
			{
				result = CarrierElevType.IT_ENUM_MAX;
			}
			return result;
		}
		protected CarrierElevType(int value)
		{
			this._value = value;
			if (value >= 0 && value < CarrierElevType._size)
			{
				CarrierElevType._array[this._value] = this;
			}
		}
		public bool Equals(CarrierElevType otherEnum)
		{
			return otherEnum.Value() == this._value;
		}
		public override string ToString()
		{
			return CarrierElevType.displayStrings[this._value];
		}
	}
}
